package com.songlanyun.modules.coupon.service;

import com.songlanyun.common.drive.IBaseService;
import com.songlanyun.common.utils.PageUtils;
import com.songlanyun.modules.coupon.entity.CouponEntity;
import com.songlanyun.modules.coupon.model.dto.CouponEntityDTO;
import com.songlanyun.modules.coupon.model.vo.CouponEntityVo;

import java.util.List;
import java.util.Map;

/**
 * 优惠券
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2022-07-05 15:20:02
 */
public interface CouponService extends IBaseService<Long,CouponEntity> {

    @Override
    PageUtils queryPage(Map<String, Object> params);

    PageUtils canReceivePage(Map<String, Object> params);

    CouponEntity add(CouponEntityDTO dto);

    CouponEntity edit(CouponEntityDTO dto);


    CouponEntity loadById(Long couponId,Boolean tw);

    CouponEntity loadByCode(String code,Boolean tw);

    CouponEntityVo loadByCouponSlimEntity(Long couponId, Boolean tw);

    List<CouponEntity> loadValidNewPerson();


    void batchRemoveByIds(List<Long> asList);

    void released(Long id, Long shopId);

    void cancelReleased(Long id, Long shopId);

    void stop(Long id, Long shopId);

    void cancelStop(Long id, Long shopId);

}

